/*
 * CarteiraVermifugo.java
 *
 * Created on October 12, 2007, 10:46 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package petstore.model;

import petstore.model.enumeration.SituacaoVermifugacao;
import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Entity class CarteiraVermifugo
 * 
 * @author Tom Hayden
 */
@Entity
@Table(name = "carteira_vermifugo")
@AttributeOverride(name="id", column=@Column(name="nrvermifugacao"))
public class CarteiraVermifugo extends BusinessObject {

    @Column(name = "dtvermifugacao")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dataVermifugacao;
    
    @Column(name = "dtproxvermifugacao")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dataProximaVermifugacao;

    @Column(name = "stvermifugacao")
    @Enumerated(EnumType.ORDINAL)
    private SituacaoVermifugacao situacaoVermifugacao;
    
    @Column(name = "txvermifugacao")
    private String observacao;

    @ManyToOne
    @JoinColumn(name="cdanimal")
    private Animal animal;
    
    @ManyToOne
    @JoinColumn(name="cdvermifugo")
    private Vermifugo vermifugo;
    
    /** Creates a new instance of CarteiraVermifugo */
    public CarteiraVermifugo() {
    }

    public Date getDataVermifugacao() {
        return dataVermifugacao;
    }

    public void setDataVermifugacao(Date dataVermifugacao) {
        this.dataVermifugacao = dataVermifugacao;
    }

    public Date getDataProximaVermifugacao() {
        return dataProximaVermifugacao;
    }

    public void setDataProximaVermifugacao(Date dataProximaVermifugacao) {
        this.dataProximaVermifugacao = dataProximaVermifugacao;
    }

    public SituacaoVermifugacao getSituacaoVermifugacao() {
        return situacaoVermifugacao;
    }

    public void setSituacaoVermifugacao(SituacaoVermifugacao situacaoVermifugacao) {
        this.situacaoVermifugacao = situacaoVermifugacao;
    }

    public String getObservacao() {
        return observacao;
    }

    public void setObservacao(String observacao) {
        this.observacao = observacao;
    }

    public Animal getAnimal() {
        return animal;
    }

    public void setAnimal(Animal animal) {
        this.animal = animal;
    }

    public Vermifugo getVermifugo() {
        return vermifugo;
    }

    public void setVermifugo(Vermifugo vermifugo) {
        this.vermifugo = vermifugo;
    }

}
